/* 
 * File:   Term.h
 * Author: taylor
 *
 * Created on November 7, 2012, 2:27 PM
 */

#ifndef TERM_H
#define	TERM_H

#include <string>
#include <vector>
#include<map>

using namespace std;

class Term {
public:
    /**
     * Term default constructor
     */
    Term();
    
    /**
     * Term constructor with term argument
     * @param term the term to set
     */
    Term(string term);
    bool operator<(Term &rgt);
    string getTerm() const;
    void setTerm(string term);
    void addOccrances(int occurances);
    void addOccuranceInDocument(int documentID);
    map<int,int>* getDocumentOccurances();
    virtual ~Term();
private:
    string _term;
    int _occurances;
    
    //map document id to number of occurances
    map<int,int> _foundInDocuments;
    
};

#endif	/* TERM_H */

